package net.bolue.sysmng.tblbean;

import java.util.Iterator;
import java.util.Map;
import java.util.Set;


/**
 * 报表功能按钮
 * @author Administrator
 *
 */
public class RepFunc extends TableBean{

	/**
	 * 子系统
	 */
	private String subSys;
	
	/**
	 * 报表id
	 */
	private Integer repId;
	
	/**
	 * 功能标识
	 */
	private String funcId;
	
	/**
	 * 显示名称
	 */
	private String dispName;
	
	/**
	 * 显示序号
	 */
	private Integer dispNo;
	
	/**
	 * 功能类型
	 * 5:批量保存
	 */
	private Integer funcType;
	
	/**
	 * 功能URL
	 */
	private String funcUrl;
	
	/**
	 * URL参数
	 */
	private String urlParams;
	
	/**
	 * 备注
	 */
	private String remark;
	
	public RepFunc(String subSys,Integer repId,String funcId,String dispName,Integer dispNo,Integer funcType){
		this.subSys = subSys;
		this.repId = repId;
		this.funcId = funcId;
		this.dispName = dispName;
		this.dispNo = dispNo;
		this.funcType = funcType;
	}
	
	public RepFunc(){
		
	}
	
	public String getSubSys() {
		return subSys;
	}

	public void setSubSys(String subSys) {
		this.subSys = subSys;
	}

	public Integer getRepId() {
		return repId;
	}

	public void setRepId(Integer repId) {
		this.repId = repId;
	}

	public String getFuncId() {
		return funcId;
	}

	public void setFuncId(String funcId) {
		this.funcId = funcId;
	}

	public String getDispName() {
		return dispName;
	}

	public void setDispName(String dispName) {
		this.dispName = dispName;
	}

	public Integer getDispNo() {
		return dispNo;
	}

	public void setDispNo(Integer dispNo) {
		this.dispNo = dispNo;
	}

	public Integer getFuncType() {
		return funcType;
	}

	public void setFuncType(Integer funcType) {
		this.funcType = funcType;
	}

	public String getFuncUrl() {
		return funcUrl;
	}

	public void setFuncUrl(String funcUrl) {
		this.funcUrl = funcUrl;
	}

	public String getUrlParams() {
		return urlParams;
	}

	public void setUrlParams(String urlParams) {
		this.urlParams = urlParams;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Override
	public TableBean mapToEntry(Map<String, Object> map) {
		RepFunc repFunc = new RepFunc();
		Set<String> keySet = map.keySet();
		Iterator<String> keyIt = keySet.iterator();
		while(keyIt.hasNext()){
			String key = keyIt.next();
			Object o = map.get(key);
			if("SUBSYS".equals(key)){
				repFunc.setSubSys((String)o);
			} else if("REPID".equals(key)){
				repFunc.setRepId((Integer)o);
			} else if("FUNCID".equals(key)){
				repFunc.setFuncId((String)o);
			} else if("DISPNAME".equals(key)){
				repFunc.setDispName((String)o);
			} else if("DISPNO".equals(key)){
				repFunc.setDispNo((Integer)o);
			} else if("FUNCTYPE".equals(key)){
				repFunc.setFuncType((Integer)o);
			} else if("FUNCURL".equals(key)){
				repFunc.setFuncUrl((String)o);
			} else if("URLPARAMS".equals(key)){
				repFunc.setUrlParams((String)o);
			} else if("REMARK".equals(key)){
				repFunc.setRemark((String)o);
			}
		}
		return repFunc;
	}

	@Override
	public String keyProps() {
		return "SUBSYS,REPID,FUNCID";
	}

}
